//
//  class.hpp
//  learnC++
//
//  Created by apple on 2018/6/1.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#ifndef class_hpp
#define class_hpp

#include <stdio.h>
#include <iostream>
#include <string>
#include <array>
#include <vector>

//成员变量使用“m_”前缀有助于将成员变量与函数参数或成员函数内的局部变量区分开来
//一般类名应该以大写字母开头
class DateClass {
    
public:
    int m_year;
    int m_month;
    int m_day;
//如果没写构造函数，可以这样DateClass today {2020,10,4};可看成具有结构体的性质
//    DateClass(){
//
//    }
    
    void getDate(){
        std::cout << m_year << "/" << m_month << "/" << m_day << std::endl;
    }
    
};

class EmployeeClass {
    
public:
    std::string m_name;
    int m_id;
    double m_wage;
    
    void earn(){
        std::cout << m_name << "/" << m_id << "/" << m_wage << std::endl;
    }
    
    void instanceMethod();
};

#endif /* class_hpp */
